var app = getApp();
Page({
  onShow() {
  },
  onReady: function (res) {
  },
  loginH(e){
    var index = e.currentTarget.dataset.index;
    var url = '',
        encodeUrl = '';
    switch(index){
      case '1.1':
        url = '';
        break;
      case '1.2':
        url = '';
        break;
      case '1.3':
        url = 'supplierloginG';
        break;
      case '2.1':
        url = 'supplierlogin';
        break;
      case '2.2':
        url = 'pharmacylogin';
        break;
      case '2.3':
        url = '';
        break;
      case '3.1':
        url = 'conlogin';
        break;
      case '3.2':
        url = 'storagelogin';
        break;
      case '3.3':
        url = 'carrierlogin';
        break;
      case '3.4':
        url = 'login';
        break;
      case '3.5':
        url = 'terminallogin';
        break;
    };
    
    encodeUrl = encodeURIComponent('https://wxtest.csyaoly.com/' + url);
    console.log(encodeUrl);

    wx.navigateTo({
      url: '/pages/webview/webview?url=' + encodeUrl + ''
    })
  },
  loginO(e){
    var index = e.currentTarget.dataset.index;
    var url = '',
        encodeUrl = '';
    switch (index) {
      case '1':
        url = 'login_register';
        break;
      case '2':
        url = 'login_propa';
        break;
      case '3':
        url = 'login_invite';
        break;
      case '4':
        url = 'login_cloud';
        break;
    };
    encodeUrl = encodeURIComponent('https://wxtest.csyaoly.com/#!/' + url);
    console.log(encodeUrl);

    wx.navigateTo({
      url: '/pages/webview/webview?url=' + encodeUrl
    })
  }
})